package com.funmi.lizip.entity.vo;

import com.baomidou.mybatisplus.annotation.*;
import com.funmi.lizip.common.model.BaseEntity;
import lombok.Data;

import java.io.Serializable;

/**
 * 
 * @TableName Battery
 */
@TableName(value ="Battery")
@Data
public class BatteryVo implements Serializable {
    /**
     *
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 站点
     */
    private String site;

    /**
     * 负载电压(V)
     */
    private String voltage;

    /**
     * 负载电流(A)
     */
    private String current;

    /**
     * 蓄电池剩余电量(%)
     */
    private String soc;

    /**
     * 蓄电池状态
     */
    private String batteryStatus;

    /**
     * 充电设备状态
     */
    private String chargingDeviceStatus;

    /**
     * 放电设备状态
     */
    private String dischargeEquipmentStatus;

    /**
     * 当日最高蓄电池电压(V)
     */
    private String highest;

    /**
     * 当日最低蓄电池电压(V)
     */
    private String lowest;

    /**
     * 
     */
    @TableField(value = "is_delete",select = false)
    @TableLogic
    private Integer idDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BatteryVo other = (BatteryVo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getSite() == null ? other.getSite() == null : this.getSite().equals(other.getSite()))
            && (this.getVoltage() == null ? other.getVoltage() == null : this.getVoltage().equals(other.getVoltage()))
            && (this.getCurrent() == null ? other.getCurrent() == null : this.getCurrent().equals(other.getCurrent()))
            && (this.getSoc() == null ? other.getSoc() == null : this.getSoc().equals(other.getSoc()))
            && (this.getBatteryStatus() == null ? other.getBatteryStatus() == null : this.getBatteryStatus().equals(other.getBatteryStatus()))
            && (this.getChargingDeviceStatus() == null ? other.getChargingDeviceStatus() == null : this.getChargingDeviceStatus().equals(other.getChargingDeviceStatus()))
            && (this.getDischargeEquipmentStatus() == null ? other.getDischargeEquipmentStatus() == null : this.getDischargeEquipmentStatus().equals(other.getDischargeEquipmentStatus()))
            && (this.getHighest() == null ? other.getHighest() == null : this.getHighest().equals(other.getHighest()))
            && (this.getLowest() == null ? other.getLowest() == null : this.getLowest().equals(other.getLowest()))
            && (this.getIdDelete() == null ? other.getIdDelete() == null : this.getIdDelete().equals(other.getIdDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getSite() == null) ? 0 : getSite().hashCode());
        result = prime * result + ((getVoltage() == null) ? 0 : getVoltage().hashCode());
        result = prime * result + ((getCurrent() == null) ? 0 : getCurrent().hashCode());
        result = prime * result + ((getSoc() == null) ? 0 : getSoc().hashCode());
        result = prime * result + ((getBatteryStatus() == null) ? 0 : getBatteryStatus().hashCode());
        result = prime * result + ((getChargingDeviceStatus() == null) ? 0 : getChargingDeviceStatus().hashCode());
        result = prime * result + ((getDischargeEquipmentStatus() == null) ? 0 : getDischargeEquipmentStatus().hashCode());
        result = prime * result + ((getHighest() == null) ? 0 : getHighest().hashCode());
        result = prime * result + ((getLowest() == null) ? 0 : getLowest().hashCode());
        result = prime * result + ((getIdDelete() == null) ? 0 : getIdDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", site=").append(site);
        sb.append(", voltage=").append(voltage);
        sb.append(", current=").append(current);
        sb.append(", soc=").append(soc);
        sb.append(", batteryStatus=").append(batteryStatus);
        sb.append(", chargingDeviceStatus=").append(chargingDeviceStatus);
        sb.append(", dischargeEquipmentStatus=").append(dischargeEquipmentStatus);
        sb.append(", highest=").append(highest);
        sb.append(", lowest=").append(lowest);
        sb.append(", idDelete=").append(idDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}